package com.huawei.appmarket.service.productpurchase.node;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import com.huawei.appmarket.service.productpurchase.card.HorizontalProductsInAppCard;
import com.huawei.appmarket.service.store.awk.widget.horizon.BaseHorizonCard;
import o.cdr;
import o.cgz;
import o.chy;
import o.chz;
import o.eed;
import o.ewm.h;

public class HorizontalProductsInAppNode extends cdr {
    protected HorizontalProductsInAppCard ˊ;

    public HorizontalProductsInAppNode(Context context) {
        super(context, 0);
    }

    public int ˏ() {
        return eed.ˋ(this.ॱ);
    }

    public boolean ˊ(ViewGroup viewGroup, ViewGroup viewGroup2) {
        LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -1);
        this.ˊ = new HorizontalProductsInAppCard(this.ॱ);
        LinearLayout linearLayout = (LinearLayout) LayoutInflater.from(this.ॱ).inflate(ˋ(), null);
        this.ˊ.ˏ((View) linearLayout);
        ˊ(this.ˊ);
        viewGroup.addView(linearLayout, layoutParams);
        return true;
    }

    public int ˋ() {
        return h.ˋﾞ;
    }

    public boolean ॱ(chz o_chz, ViewGroup viewGroup) {
        if (this.ˊ != null) {
            this.ˊ.ˊ(o_chz, ͺ());
        }
        return super.ॱ(o_chz, viewGroup);
    }

    public void ˋ(chy o_chy) {
        int i = 0;
        while (i < ˊॱ()) {
            cgz ˊ = ˊ(i);
            if (ˊ instanceof BaseHorizonCard) {
                ((HorizontalProductsInAppCard) ˊ).ˊ(o_chy);
                i++;
            } else {
                return;
            }
        }
    }
}
